/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __0BBCA93C_641A_4485_B668_429C7F0A4EBE__
#define __0BBCA93C_641A_4485_B668_429C7F0A4EBE__

#include "../tools/head.h"

/////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos_aio
{
    class aio_impl;
    class msg_impl;

    class aio_thread
    {
    public:
        aio_thread( aio_impl * pAioImpl );
        ~aio_thread();

    protected:
        static void * thread( void * lpData );

    protected:
        int proc_close();
        int run();

    protected:
        xos::i_thread * m_pThread;
        aio_impl * m_pAioImpl;

    public:
        int notify( msg_impl * p );
        int init();
        int term();
    };
} // xos_aio

#endif // __0BBCA93C_641A_4485_B668_429C7F0A4EBE__
